/* ---------------------------------------------------------------------- */
/* Script generated with: DeZign for Databases v4.2.0                     */
/* Target DBMS:           MS SQL Server 2005                              */
/* Project file:          Database.dez                                    */
/* Project name:                                                          */
/* Author:                                                                */
/* Script type:           Database drop script                            */
/* Created on:            2012-02-07 22:48                                */
/* ---------------------------------------------------------------------- */


/* ---------------------------------------------------------------------- */
/* Drop foreign key constraints                                           */
/* ---------------------------------------------------------------------- */

ALTER TABLE [Member] DROP CONSTRAINT [CreditCard_Member]
GO

ALTER TABLE [Member] DROP CONSTRAINT [Role_Member]
GO

ALTER TABLE [Customer] DROP CONSTRAINT [CustomerType_Customer]
GO

ALTER TABLE [Customer] DROP CONSTRAINT [Member_Customer]
GO

ALTER TABLE [Ticket] DROP CONSTRAINT [Member_Ticket]
GO

ALTER TABLE [Ticket] DROP CONSTRAINT [Customer_Ticket]
GO

ALTER TABLE [Ticket] DROP CONSTRAINT [Class_Ticket]
GO

ALTER TABLE [Ticket] DROP CONSTRAINT [Flight_Ticket]
GO

ALTER TABLE [Flight] DROP CONSTRAINT [Plane_Flight]
GO

ALTER TABLE [Flight] DROP CONSTRAINT [Map_Flight]
GO

ALTER TABLE [FlightClassSeat] DROP CONSTRAINT [Flight_FlightClassSeat]
GO

ALTER TABLE [FlightClassSeat] DROP CONSTRAINT [Class_FlightClassSeat]
GO

ALTER TABLE [Map] DROP CONSTRAINT [Location_Map_original]
GO

ALTER TABLE [Map] DROP CONSTRAINT [Location_Map_destination]
GO

ALTER TABLE [Location] DROP CONSTRAINT [Country_Location]
GO

ALTER TABLE [Plane] DROP CONSTRAINT [PlaneType_Plane]
GO

ALTER TABLE [PlaneClassSeat] DROP CONSTRAINT [Plane_PlaneClassSeat]
GO

ALTER TABLE [PlaneClassSeat] DROP CONSTRAINT [Class_PlaneClassSeat]
GO

ALTER TABLE [CreditCardLog] DROP CONSTRAINT [CreditCard_CreditCardLog]
GO

ALTER TABLE [Router] DROP CONSTRAINT [Location_Router_original]
GO

ALTER TABLE [Router] DROP CONSTRAINT [Location_Router_destination]
GO

ALTER TABLE [RouterDetail] DROP CONSTRAINT [Flight_RouterDetail]
GO

ALTER TABLE [RouterDetail] DROP CONSTRAINT [Router_RouterDetail]
GO

ALTER TABLE [RegisterRouter] DROP CONSTRAINT [Customer_RegisterRouter]
GO

ALTER TABLE [RegisterRouter] DROP CONSTRAINT [Router_RegisterRouter]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "Member"                                                    */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Member] DROP CONSTRAINT [DEF_Member_ActiveLogin]
GO

ALTER TABLE [Member] DROP CONSTRAINT [PK_Member]
GO

ALTER TABLE [Member] DROP CONSTRAINT [TUC_Member_1]
GO

ALTER TABLE [Member] DROP CONSTRAINT [TUC_Member_2]
GO

/* Drop table */

DROP TABLE [Member]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "CreditCard"                                                */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [CreditCard] DROP CONSTRAINT [DEF_CreditCard_Active]
GO

ALTER TABLE [CreditCard] DROP CONSTRAINT [PK_CreditCard]
GO

/* Drop table */

DROP TABLE [CreditCard]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "Customer"                                                  */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Customer] DROP CONSTRAINT [DEF_Customer_MemberId]
GO

ALTER TABLE [Customer] DROP CONSTRAINT [DEF_Customer_Sex]
GO

ALTER TABLE [Customer] DROP CONSTRAINT [PK_Customer]
GO

ALTER TABLE [Customer] DROP CONSTRAINT [TUC_Customer_1]
GO

/* Drop table */

DROP TABLE [Customer]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "CustomerType"                                              */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [CustomerType] DROP CONSTRAINT [DEF_CustomerType_Active]
GO

ALTER TABLE [CustomerType] DROP CONSTRAINT [PK_CustomerType]
GO

/* Drop table */

DROP TABLE [CustomerType]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "Ticket"                                                    */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Ticket] DROP CONSTRAINT [PK_Ticket]
GO

ALTER TABLE [Ticket] DROP CONSTRAINT [TCC_Ticket_1]
GO

/* Drop table */

DROP TABLE [Ticket]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "Class"                                                     */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Class] DROP CONSTRAINT [DEF_Class_Active]
GO

ALTER TABLE [Class] DROP CONSTRAINT [PK_Class]
GO

/* Drop table */

DROP TABLE [Class]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "Flight"                                                    */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Flight] DROP CONSTRAINT [DEF_Flight_Active]
GO

ALTER TABLE [Flight] DROP CONSTRAINT [PK_Flight]
GO

ALTER TABLE [Flight] DROP CONSTRAINT [TUC_Flight_1]
GO

ALTER TABLE [Flight] DROP CONSTRAINT [TCC_Flight_2]
GO

/* Drop table */

DROP TABLE [Flight]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "FlightClassSeat"                                           */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [FlightClassSeat] DROP CONSTRAINT [DEF_FlightClassSeat_NumberSeats]
GO

ALTER TABLE [FlightClassSeat] DROP CONSTRAINT [PK_FlightClassSeat]
GO

ALTER TABLE [FlightClassSeat] DROP CONSTRAINT [TUC_FlightClassSeat_1]
GO

ALTER TABLE [FlightClassSeat] DROP CONSTRAINT [TCC_FlightClassSeat_2]
GO

/* Drop table */

DROP TABLE [FlightClassSeat]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "Map"                                                       */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Map] DROP CONSTRAINT [DEF_Map_Active]
GO

ALTER TABLE [Map] DROP CONSTRAINT [PK_Map]
GO

ALTER TABLE [Map] DROP CONSTRAINT [TUC_Map_1]
GO

ALTER TABLE [Map] DROP CONSTRAINT [TCC_Map_2]
GO

ALTER TABLE [Map] DROP CONSTRAINT [TCC_Map_3]
GO

/* Drop table */

DROP TABLE [Map]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "Location"                                                  */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Location] DROP CONSTRAINT [DEF_Location_Active]
GO

ALTER TABLE [Location] DROP CONSTRAINT [PK_Location]
GO

/* Drop table */

DROP TABLE [Location]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "Country"                                                   */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Country] DROP CONSTRAINT [DEF_Country_Active]
GO

ALTER TABLE [Country] DROP CONSTRAINT [PK_Country]
GO

/* Drop table */

DROP TABLE [Country]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "Plane"                                                     */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Plane] DROP CONSTRAINT [DEF_Plane_Active]
GO

ALTER TABLE [Plane] DROP CONSTRAINT [PK_Plane]
GO

/* Drop table */

DROP TABLE [Plane]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "PlaneClassSeat"                                            */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [PlaneClassSeat] DROP CONSTRAINT [PK_PlaneClassSeat]
GO

ALTER TABLE [PlaneClassSeat] DROP CONSTRAINT [TUC_PlaneClassSeat_1]
GO

ALTER TABLE [PlaneClassSeat] DROP CONSTRAINT [TCC_PlaneClassSeat_2]
GO

/* Drop table */

DROP TABLE [PlaneClassSeat]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "PlaneType"                                                 */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [PlaneType] DROP CONSTRAINT [PK_PlaneType]
GO

ALTER TABLE [PlaneType] DROP CONSTRAINT [TCC_PlaneType_1]
GO

/* Drop table */

DROP TABLE [PlaneType]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "Role"                                                      */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Role] DROP CONSTRAINT [DEF_Role_Active]
GO

ALTER TABLE [Role] DROP CONSTRAINT [PK_Role]
GO

/* Drop table */

DROP TABLE [Role]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "CreditCardLog"                                             */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [CreditCardLog] DROP CONSTRAINT [PK_CreditCardLog]
GO

ALTER TABLE [CreditCardLog] DROP CONSTRAINT [TUC_CreditCardLog_1]
GO

ALTER TABLE [CreditCardLog] DROP CONSTRAINT [TCC_CreditCardLog_2]
GO

/* Drop table */

DROP TABLE [CreditCardLog]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "Router"                                                    */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Router] DROP CONSTRAINT [DEF_Router_Active]
GO

ALTER TABLE [Router] DROP CONSTRAINT [PK_Router]
GO

ALTER TABLE [Router] DROP CONSTRAINT [TUC_Router_1]
GO

/* Drop table */

DROP TABLE [Router]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "RouterDetail"                                              */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [RouterDetail] DROP CONSTRAINT [PK_RouterDetail]
GO

ALTER TABLE [RouterDetail] DROP CONSTRAINT [TUC_RouterDetail_1]
GO

/* Drop table */

DROP TABLE [RouterDetail]
GO

/* ---------------------------------------------------------------------- */
/* Drop table "RegisterRouter"                                            */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [RegisterRouter] DROP CONSTRAINT [PK_RegisterRouter]
GO

ALTER TABLE [RegisterRouter] DROP CONSTRAINT [TUC_RegisterRouter_1]
GO

/* Drop table */

DROP TABLE [RegisterRouter]
GO
